package com.example.xd.javatest.retrofit_test;

import com.example.xd.javatest.retrofit_test.bean.Bean;
import com.example.xd.javatest.retrofit_test.bean.Bean1;
import com.example.xd.javatest.retrofit_test.bean.Bean2;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * @auther XuDan on 2020/6/28.
 */
public interface NetApi {

    @GET("wxarticle/chapters/json")
    Call<Bean> getData();

    @GET("wxarticle/list/{id}/{page}/json")
    Call<Bean1> getData1(@Path("id") int id, @Path("page") int page);

    //https://wanandroid.com/wxarticle/list/405/1/json?k=Java
    @GET("wxarticle/list/{id}/{page}/json")
    Call<Bean2> getData2(@Path("id") int id, @Path("page") int page, @Query("k") String k);
}
